<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Vue 应用和组件</title>
</head>
<body>
  <div id="root"></div>

  <script src="https://unpkg.com/vue@next"></script>
  <script>
    // 创建应用
    const app = Vue.createApp({
      // 根组件的配置
      // 数据
      data(){
        return {
          message: 'Hello Vue'
        }
      },
      // 模版
      template: '<div><h1>{{ message }}</h1></div>'
    });
    const vm = app.mount('#root') // 根组件
  </script>
</body>
</html>